import java.util.Arrays;

public class String1 {
    public static void main(String[] args) {
        String name="lxc";
        String free=new String("yes!");
        System.out.println(name);
        System.out.println(free);
        System.out.println(name.length());
        System.out.println(free.length());
        char[]arr={'a','g','h','s'};
        String arr1= Arrays.toString(arr);
        String arr2=new String(arr);
        System.out.println(arr1);
        System.out.println(arr2);
        System.out.println(name.isEmpty());//判断字符串是否为空
        System.out.println(name.equals(free));
        String names=name.toUpperCase();
        System.out.println(names);
        char ont=names.charAt(1);
        System.out.println(ont);
    }
}
